package com.mayuanfei.springioc.service.impl;

import com.mayuanfei.springioc.dao.SysUserMapper;
import com.mayuanfei.springioc.domain.SysUser;
import com.mayuanfei.springioc.service.SysUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 用户服务实现类
 *
 * @author 老马
 * @date 2023-02-20 08:53
 */
@Service
public class SysUserServcieImpl2 implements SysUserService {

    private SysUserMapper userMapper;

    /**
     * 添加用户
     *
     * @param user 用户对象
     */
    public void addUser(SysUser user) {
        this.userMapper.insertSysUser(user);
    }

    @Autowired
    public void setUserMapper(SysUserMapper userMapper) {
        this.userMapper = userMapper;
    }
}